<?php


/**
* Puree CMS
* http://www.molotsoft.ru
*
* @package Puree_CMS
* @subpackage Elements
* @author Ivan Chistyakov <ivan@molotsoft.ru>
* @version $Id: ump3player.ctp 443 2010-02-10 17:48:32Z molotsoft@gmail.com $
* @link $HeadURL: http://puree-cms.googlecode.com/svn/trunk/views/elements/objects/ump3player.ctp $
*/


// default params
extract(array('url' => '', 'width' => 470, 'height' => 70, 'comment' => ''), EXTR_SKIP);

if (empty($comment)) {
	$url_parts = parse_url($url);
	if (array_key_exists('path', $url_parts)) $comment = basename($url_parts['path']);
}


?>
<object type="application/x-shockwave-flash" data="<?php echo WEBROOT_LIBS_URL; ?>ump3player/ump3player_500x70.swf" width="<?php echo (int)$width; ?>" height="<?php echo (int)$height; ?>">
<param name="wmode" value="transparent" />
<param name="allowFullScreen" value="true" />
<param name="allowScriptAccess" value="always" />
<param name="movie" value="<?php echo WEBROOT_LIBS_URL; ?>ump3player/ump3player_500x70.swf" />
<param name="FlashVars" value="way=<?php echo urlencode($url); ?>&amp;swf=<?php echo WEBROOT_LIBS_URL; ?>ump3player/ump3player_500x70.swf&amp;w=<?php echo (int)$width; ?>&amp;h=<?php echo (int)$height; ?>&amp;time_seconds=&amp;autoplay=0&amp;q=&amp;skin=white&amp;volume=70&amp;comment=<?php echo urlencode($comment); ?>" />
</object>